#pragma once
#include <windows.h>
#include "baseType.h"

class Window
{
public:
	struct Setting 
	{
		uint	width;
		uint	height;
		bool	fullScreen;
		String	caption;
		String	iconFile;
	};

	const static  Setting DefaultSetting;
public:
	explicit Window(const Setting& setting);
	virtual ~Window(void);
	HWND	HWnd;
	uint	Width;
	uint	Height;
	bool	IsActive;
	bool	IsMinimized;
public:
	bool HandleMessage();

	bool ShowWindow(bool show = true);

protected:
	virtual LRESULT WINAPI WndProc(uint msg, WPARAM wParam, LPARAM lParam );

	virtual void OnResize(int width, int height){}

	virtual void OnDestroy() {}
private:
	static LRESULT WINAPI WndProc( HWND hWnd, uint msg, WPARAM wParam, LPARAM lParam );


};

